document.addEventListener('plusready',function(){
	plus.nativeUI.closeWaiting();
	var uid = plus.storage.getItem('uid');
	var gid = plus.storage.getItem('gid');
	PullToRefresh(plus.webview.currentWebview().id, uid, gid);
	var ws = plus.webview.currentWebview();
	var user = plus.storage.getItem('user');
	var name = plus.storage.getItem('name') != 'null'?plus.storage.getItem('name'):'';//用户名称
	var status = plus.storage.getItem('status');
	var avatar = plus.storage.getItem('userAvatar') != 'null'?getAvatar(plus.storage.getItem('userAvatar')):'../images/iconic.png';
	console.log(uid+' '+name+" "+gid+" "+user+' '+avatar);
	if(gid == 4){//医生
		$('.business').hide();
	}else if(gid == 3){//商家
		$('.doctor').hide();
	}
	$('.name').text(name);
	$('.phone').text(user);
	$('.userAvatar').attr('src',avatar);
	$('.goUserInfo').on('click',function(){
		goNewPage('me-centre-information.html', {spage :ws.id});
	})
	$('.authstatus').click(function(){//在线问诊
		if(status == '2'){
			openNewpage('zxwz-doctor-home.html');
		}else{
			toast('您的身份暂未认证通过，不能进行此操作');
		}
	})
	$('.charging').click(function(){//计费模块
		if(status == '2'){
			openNewpage('me-jf-home.html');
		}else{
			toast('您的身份暂未认证通过，不能进行此操作');
		}
	})
},false)